﻿using iS3.DAL.Attributes;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace iS3.DAL
{
    /// <summary>
    /// the struct of property of entity
    /// </summary>
    [TableName("System_DGPropertyStruct")]
    public class DGPropertyStruct: DGEntity
    {

        public long Ref_StructID { get; set; }
        #region key attribute
        /// <summary>
        /// 是否关键字
        /// </summary>
        public bool IsPrimaryKey = false;


        public bool UseKey = false;
        /// <summary>
        /// 是否允许为Null
        /// </summary>
        public bool IsCanNull { get; set; }

        /// <summary>
        /// 是否自增加
        /// </summary>
        public bool IsAutoIncrement { get; set; }

        #endregion

        #region property attribute

        /// <summary>
        /// 属性名
        /// </summary>
        public string PropertyName { get; set; }


        /// <summary>
        /// 中文名称
        /// </summary>
        public string ChsName { get; set; }

        /// <summary>
        /// sqlDbType 类型
        /// </summary>
        public SqlDbType SqlType { get; set; }
        #endregion

        #region description sttribute

        /// <summary>
        /// 字段描述
        /// </summary>
        public string Description { get; set; }

        #endregion

        #region  display attribute

        public bool IsCanIgnore { get; set; }
        public bool IsCanOrder { get; set; }
        public int MaxLength { get; set; }
        #endregion

        #region external attribute

        public string Unit { get; set; }
        public string Example { get; set; }
        public string Target { get; set; }
        #endregion

    }
}
